#
# Copyright (C) 2009-2010 Jo-Philipp Wich <xm@subsignal.org>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=lte-4g
PKG_RELEASE:=1

PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/lte-4g
  SECTION:=net
  CATEGORY:=Network
  SUBMENU:=Fnic
  TITLE:=lte-4g Utility
  MAINTAINER:=zxs <zxsmail@126.com>
  DEPENDS:=
endef

define Package/lte-4g/description
 use for get/set wifi info with ioctl 
endef

define Build/Prepare
	mkdir -p $(PKG_BUILD_DIR)
	chmod +x ./files/* -R
	$(CP) ./files/* $(PKG_BUILD_DIR)/
endef

define Build/Compile
endef

define Build/Configure
endef


define Package/lte-4g/install
	#$(INSTALL_DIR) $(1)/lib/lte-4g
	#$(INSTALL_BIN) $(PKG_BUILD_DIR)/*.sh $(1)/lib/lte-4g/
	$(INSTALL_DIR) $(1)/usr/sbin/
	#$(INSTALL_BIN) $(PKG_BUILD_DIR)/*.sh $(1)/usr/sbin/
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ecm/*.sh $(1)/usr/sbin/
	
	$(INSTALL_DIR) $(1)/etc/chatscripts
	$(INSTALL_DATA) $(PKG_BUILD_DIR)/ppp/chat/cmlte $(1)/etc/chatscripts/cmlte.chat
	$(INSTALL_DATA) $(PKG_BUILD_DIR)/ppp/chat/ctlte $(1)/etc/chatscripts/ctlte.chat
	$(INSTALL_DATA) $(PKG_BUILD_DIR)/ppp/chat/culte $(1)/etc/chatscripts/culte.chat
	
	$(INSTALL_DIR) $(1)/lib/netifd/proto
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ppp/netifd/4g.sh $(1)/lib/netifd/proto/4g.sh
endef

$(eval $(call BuildPackage,lte-4g))
